home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Environments / SmallEiffel 0.3.3 / SmallEiffel 68k / lib_test / test_equal.e < prev    next >
Encoding:
Text File  |  1996-06-13  |  774 b   |  44 lines  |  [TEXT/EDIT]

  1. -- Part of SmallEiffel -- Read DISCLAIMER file -- Copyright (C) 
  2. -- Dominique COLNET and Suzanne COLLIN -- colnet@loria.fr
  3. --
  4. class TEST_EQUAL
  5.  
  6. creation {ANY}
  7.    make
  8.    
  9. feature {ANY}
  10.  
  11.    make is
  12.       local
  13.      animal: ANIMAL;
  14.      cat: CAT;
  15.      dog: DOG;
  16.       do
  17.      is_true(equal(Void,Void));
  18.      
  19.      is_true(equal(3,3));
  20.      is_true(not equal(2,3));
  21.      
  22.      !!cat;
  23.      !!dog;
  24.      !CAT!animal;
  25.      is_true(equal(animal,cat));
  26. -- *** VERIFIER DANS PELKS is_true(not equal(animal,dog));
  27.       end;
  28.    
  29.    is_true(b: BOOLEAN) is
  30.       do
  31.      cpt := cpt + 1;
  32.      if not b then
  33.         std_output.put_string("ERROR IN TEST ");
  34.         std_output.put_integer(cpt);
  35.         std_output.put_string("%N");
  36.      else
  37.         -- std_output.put_string("Yes %N");
  38.      end;
  39.       end;
  40.    
  41.    cpt: INTEGER;
  42.    
  43. end -- TEST_EQUAL
  44.